<?php

namespace App\System\Coupon\Repositories;

use App\Module\Api\Controllers\Request\TableRequest;
use App\System\Base\Helpers\Traits\SinglePattern;
use App\System\Base\Repositories\Repository;
use App\System\Coupon\Model\CouponUser;
use App\System\Coupon\Model\CourClass;


class CourClassRepository extends Repository
{
    use SinglePattern;

    public function getCourClassNameById($id,$field)
    {
        $data=CourClass::select($field)->find($id);
        if (!$data){
            return false;
        }
        return $data->getAttributeValue($field);
    }
    public function getCourClassById($id)
    {
        return CourClass::find($id);
    }
}